home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #4 / Amiga Plus CD - 2000 - No. 4.iso / Tools / Text / HTML / HTMLEXT / mod / htmlext.smod
Encoding:
Text File  |  2000-03-14  |  6.6 KB  |  236 lines

  1. /* $VER: htmlext.smod Rev.059 © by Juan Manuel Wehrli 1999 - 2000
  2.    HTMLEXT System Modul
  3.  */
  4.  
  5. dbname = "HTMLEXT"
  6.  
  7. if ~show("L",rexxreqtools.library) then do
  8.         call addlib("rexxreqtools.library",0,-30,0)
  9. end
  10. if ~show("L",rexxtricks.library) then do
  11.         call addlib("rexxtricks.library",0,-30,0)
  12. end
  13. NL = '0a'x
  14.  
  15. OPTIONS RESULTS
  16. PARSE ARG befehl option
  17. ADDRESS COMMAND
  18.  
  19. /* START
  20.  */
  21. if befehl = "START" then do
  22.     if EXISTS('guis:gui4cli') then do
  23.         'assign GUIs: HTMLEXT:GUI ADD'
  24.         'assign LIBS: HTMLEXT:Libs ADD'
  25.         'assign FONTS: HTMLEXT:Fonts ADD'
  26.         'gui HTMLEXT:GUI/HTMLEXT'
  27.     end
  28.     else do
  29.         call rtezrequest('Gui4Cli ist nicht oder nicht korrekt installiert!' || nl || 'Bitte kontrolieren Sie die Gui4Cli Installation ...','Werde ich nun überprüfen.',dbname || ': Gui4Cli Erweiterung fehlt ...',,nil)
  30.     end
  31. end
  32.  
  33. /* WINAWEB
  34.  */
  35. if befehl = "WINAWEB" then do
  36.     call rtezrequest('Nach Bestätigeung aktivieren Sie bitte das AWeb Fenster,' || nl || 'das der gewünschten Grösse entspricht.','Weiter',dbname || ': Fenster Positionierung',,nil)
  37.     'HTMLEXT:c/WinInfo >env:.htmlext'
  38.     if open('f','env:.htmlext','r') then do
  39.         nil = readln('f')
  40.         nil = readln('f')
  41.         widthstr = readln('f')
  42.         heightstr = readln('f')
  43.         topstr = readln('f')
  44.         leftstr = readln('f')
  45.         call close('f')
  46.     end
  47.     lw = LENGTH(widthstr)
  48.     strl = lw - 12
  49.     width = RIGHT(widthstr, strl)
  50.     width = COMPRESS(width)
  51.  
  52.     height = heightstr
  53.     lw = LENGTH(heightstr)
  54.     strl = lw - 12
  55.     height = RIGHT(heightstr, strl)
  56.     height = COMPRESS(height)
  57.  
  58.     vtop = topstr
  59.     lw = LENGTH(topstr)
  60.     strl = lw - 12
  61.     vtop = RIGHT(topstr, strl)
  62.     vtop = COMPRESS(vtop)
  63.  
  64.     lefte = leftstr
  65.     lw = LENGTH(leftstr)
  66.     strl = lw - 12
  67.     vleft = RIGHT(leftstr, strl)
  68.     vleft = COMPRESS(vleft)
  69.  
  70.     call rtezrequest('Breite: ' || width || nl || 'Höhe: ' || height || nl || 'Von Oben: ' || vtop || nl || 'Von Links: ' || vleft,'Übernehmen|Abbrechen',dbname || ': Fenster Positionierung',,reqv)
  71.     if reqv = 1 then do
  72.         'setenv ".htmlext.tmp" "' || vleft || ',' || vtop || ',' || width || ',' || height || '"'
  73.     end
  74.     else do
  75.         'setenv ".htmlext.tmp" "-"'
  76.     end
  77.     exit
  78. end
  79.  
  80. /* WINGOLDED
  81.  */
  82. if befehl = "WINGOLDED" then do
  83.     call rtezrequest('Nach Bestätigeung aktivieren Sie bitte das GoldED Fenster,' || nl || 'das der gewünschten Grösse entspricht.','Weiter',dbname || ': Fenster Positionierung',,nil)
  84.     'HTMLEXT:c/WinInfo >env:.htmlext'
  85.     if open('f','env:.htmlext','r') then do
  86.         nil = readln('f')
  87.         nil = readln('f')
  88.         widthstr = readln('f')
  89.         heightstr = readln('f')
  90.         topstr = readln('f')
  91.         leftstr = readln('f')
  92.         call close('f')
  93.     end
  94.     lw = LENGTH(widthstr)
  95.     strl = lw - 12
  96.     width = RIGHT(widthstr, strl)
  97.     width = COMPRESS(width)
  98.  
  99.     height = heightstr
  100.     lw = LENGTH(heightstr)
  101.     strl = lw - 12
  102.     height = RIGHT(heightstr, strl)
  103.     height = COMPRESS(height)
  104.  
  105.     vtop = topstr
  106.     lw = LENGTH(topstr)
  107.     strl = lw - 12
  108.     vtop = RIGHT(topstr, strl)
  109.     vtop = COMPRESS(vtop)
  110.  
  111.     lefte = leftstr
  112.     lw = LENGTH(leftstr)
  113.     strl = lw - 12
  114.     vleft = RIGHT(leftstr, strl)
  115.     vleft = COMPRESS(vleft)
  116.  
  117.     call rtezrequest('Breite: ' || width || nl || 'Höhe: ' || height || nl || 'Von Oben: ' || vtop || nl || 'Von Links: ' || vleft,'Übernehmen|Abbrechen',dbname || ': Fenster Positionierung',,reqv)
  118.     if reqv = 1 then do
  119.         'setenv ".htmlext.tmp" "X ' || vleft || ' Y ' || vtop || ' WIDTH ' || width || ' HEIGHT ' || height || '"'
  120.     end
  121.     else do
  122.         'setenv ".htmlext.tmp" "-"'
  123.     end
  124.     exit
  125. end
  126.  
  127.  
  128. /* SITESIZE
  129.  */
  130. if befehl = "SITESIZE" then do
  131.     'list ' || Option || ' LFORMAT="%L" FILES ALL >t:htmlext/sitesize.list'
  132.     if open('f','t:htmlext/sitesize.list','r') then do
  133.         ssize = readln('f')
  134.         do while ~EOF('f')
  135.             nsize = readln('f')
  136.             if nsize ~= "" then do
  137.                 ssize = ssize + nsize
  138.             end
  139.         end
  140.         ssizekb = ssize / 1000
  141.         call rtezrequest('Die Gesammtgrösse der Site beträgt:' || nl || ssizekb || ' kB','Weiter',dbname || ': Web-Site Umfang in kB ...',,nil)
  142.     end
  143. end
  144.  
  145. /* DIRSIZE
  146.  */
  147. if befehl = "DIRSIZE" then do
  148.     'list ' || Option || ' LFORMAT="%L" FILES ALL >t:htmlext/dirsize.list'
  149.     if open('f','t:htmlext/dirsize.list','r') then do
  150.         ssize = readln('f')
  151.         do while ~EOF('f')
  152.             nsize = readln('f')
  153.             if nsize ~= "" then do
  154.                 ssize = ssize + nsize
  155.             end
  156.         end
  157.         ssizekb = ssize / 1000
  158.         call rtezrequest('Die Gesammtgrösse des aktuellen Verzeichnis beträgt:' || nl || ssizekb || ' kB','Weiter',dbname || ': Verzeichnis Umfang in kB ...',,nil)
  159.     end
  160. end
  161.  
  162.  
  163. if befehl = "WBINFO" then do
  164.     address Workbench INFO Option
  165. end
  166.  
  167.  
  168. /* MREP
  169.  */
  170. if befehl = "MREP" then do
  171.     if open("f","t:htmlext/mrep.files","r") then do
  172.         zf = 0
  173.         do while ~EOF("f")
  174.             fzeile = READLN("f")
  175.             fzeile = COMPRESS(fzeile)
  176.             if fzeile ~= "" then do
  177.                 zf = zf + 1
  178.                 if open('f2','t:htmlext/mrep.list','r') then do
  179.                     zr = 0
  180.                     do while ~EOF('f2')
  181.                         lzeile = READLN("f2")
  182.                         if lzeile ~= "" then do
  183.                             suchen = LEFT(lzeile,45)
  184.                             suchen = STRIP(suchen)
  185.                             ersetzen = RIGHT(lzeile,45)
  186.                             ersetzen = STRIP(ersetzen)
  187.                             zr = zr + 1
  188.                             address "Gui4Cli" 'Update Infobar 1 "Bearbeite ' || zf || '/ ' || zr || ': ' || fzeile || ' Von: ' || suchen || '  Durch: ' || ersetzen || '"'
  189.                             address command 'rep "' || fzeile || '" "' || suchen || '" "' || ersetzen|| '" I'
  190.                         end
  191.                     end
  192.                     call CLOSE('f2')
  193.                 end
  194.             end
  195.         end
  196.     end
  197.     call CLOSE('f')
  198.     address "Gui4Cli" 'Update Infobar 1 "Ersetzfunktion beendet. Es wurden ' || zf || ' Dateien mit je ' || zr || ' Operationen bearbeitet."'
  199. end
  200.  
  201. /* REQSTRING
  202.  */
  203. if befehl = "REQSTRING" then do
  204.     title =  GETENV('.htmlext.rqt')
  205.     body =  GETENV('.htmlext.rqb')
  206.     def =  GETENV('.htmlext.rqd')
  207.     buttons =  GETENV('.htmlext.rqu')
  208.     str = rtgetstring(def,body,title,buttons,"rtgs_backfill = false",res)
  209.     if res = 0 then do
  210.         bool =  SETENV('.htmlext.res','0')
  211.         exit
  212.     end
  213.     bool =  SETENV('.htmlext.res','1')
  214.     bool =  SETENV('.htmlext.tmp',str)
  215. end
  216.  
  217. /* GETSCRMODE
  218.  */
  219. if befehl = "GETSCRMODE" then do
  220.     'htmlext:c/getmodeinfo >t:htmlext/scrmode'
  221.     if open('f','t:htmlext/scrmode','r') then do
  222.         nil = readln('f')
  223.         nil = readln('f')
  224.         zeile = readln('f')
  225.         zeile2 = RIGHT(zeile,10)
  226.         str = "1152/900/16/"
  227.         str = str || zeile2
  228.         call setenv('.htmlext.tmp',str)
  229.         call rtezrequest('Bitte passen Sie die Angaben WIDTH/HEIGHT/DEPTH/ von Hand an!' || nl || 'Es wird standardmässig 1152/900/16/ gesetzt ...','Werde ich nun machen',dbname || ': Screenmode einstellungen ...',,nil)
  230.     end
  231. end
  232.  
  233.  
  234.  
  235. exit
  236.